package com.example.stardemo;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.util.List;

public class JsonUtil {
    public static List<Star> jsonToObject(String value) {
        return new Gson().fromJson(value, new TypeToken<List<Star>>() {}.getType());
    }

    public static String objectToJson(Object object) {
        return  new Gson().toJson(object);
    }
}